//
//  ClassOfGoodsVC.h
//  EJLX
//
//  Created by adc on 15/11/11.
//  Copyright © 2015年 江苏一键联信息科技有限公司. All rights reserved.
//

#import <UIKit/UIKit.h>

@interface ClassOfGoodsVC : UIViewController<UICollectionViewDataSource,UICollectionViewDelegate,UICollectionViewDelegateFlowLayout,UISearchBarDelegate>
{
    UITableView *_tableView;
    BOOL _isShow;
     UITextField *searchTF;
    UICollectionView *collect;
    UIButton *_beforeBtn;
    UIView *_bigView;
}


@property(nonatomic,retain)NSMutableArray *array;
@property(nonatomic,retain)ClassOfGoods *goods;
@property(nonatomic,strong)NSMutableArray *btnArr;
@end











@interface UIButton (btnColor)
-(void)setBackgroundColor:(UIColor *)backgroundColor forState:(UIControlState)state;
@end

@implementation UIButton (btnColor)

-(void)setBackgroundColor:(UIColor *)backgroundColor forState:(UIControlState)state{
    [self setBackgroundImage:[UIButton imageWithColor:backgroundColor] forState:state];
}
+(UIImage *)imageWithColor:(UIColor*)color{
    CGRect rect = CGRectMake(0.0f,0.0f, 1.0f, 1.0f);
    UIGraphicsBeginImageContext(rect.size);
    CGContextRef context = UIGraphicsGetCurrentContext();
    CGContextSetFillColorWithColor(context, [color CGColor]);
    CGContextFillRect(context, rect);
    UIImage *image = UIGraphicsGetImageFromCurrentImageContext();
    UIGraphicsEndImageContext();
    return image;
}
@end